#include
#include
#include
#include
#define U 0.1
#define V 0.053
void SetColor(unsigned short ForeColor, unsigned short BackGroundColor) /*定义两个变量背景色和主颜色*/
{
HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE);/**/
SetConsoleTextAttribute(hCon, (ForeColor) | (BackGroundColor) * 16);
}
int main()
{
int i, s = 0, t, a = 10, b = 11, c = 12,d = 13, e = 14; /*定义行*/
int z[] = { 32,32,206,210,207,178,187,182,196,227,33,32,32 }; /*定义一个字符变量*/
float x, y; /*定义x,y变量*/
srand(time(NULL));
for (y = 1.3; y >= -1.1; y -= U)
{
for (x = -2; x < 1.4; x += V)
{
if (((x*x + y * y - 1)*(x*x + y * y - 1)*(x*x + y * y - 1) - x * x * y * y) = 1.3 - 10 * U || y = -1; y -= U)
{
for (x = -2; x < 1.4; x += V)
{
if (((x*x + y * y - 1)*(x*x + y * y - 1)*(x*x + y * y - 1) - x * x * y * y) = 1.3 - 10 * U || y 28)
{
s++;
if (s % 4 == 1)
{
SetColor(a, 0);
printf("l");
}
if (s % 4 == 2)
{
SetColor(e, 0);
printf("o");
}
if (s % 4 == 3)
{
SetColor(c, 0);
printf("v");
}
if (s % 4 == 0)
{
SetColor(d, 0);
printf("e");
}
}
else
{
SetColor(e, 0);
printf("%c", z[i - 15]);
}
}
break;
}
}
else
printf(" ");
}
printf("\n");
}
Sleep(1000);
system("cls");
1>------ 已启动生成: 项目: Project31, 配置: Debug Win32 ------ 1>源.cpp 1>c:\users\23967\source\repos\project31\project31\源.cpp(17): warning C4244: “参数”: 从“time_t”转换到“unsigned int”,可能丢失数据 1>c:\users\23967\source\repos\project31\project31\源.cpp(18): warning C4305: “=”: 从“double”到“float”截断 1>c:\users\23967\source\repos\project31\project31\源.cpp(18): warning C4305: “-=”: 从“double”到“float”截断 1>c:\users\23967\source\repos\project31\project31\源.cpp(20): warning C4305: “+=”: 从“double”到“float”截断 1>c:\users\23967\source\repos\project31\project31\源.cpp(98): warning C4305: “=”: 从“double”到“float”截断 1>c:\users\23967\source\repos\project31\project31\源.cpp(98): warning C4305: “-=”: 从“double”到“float”截断 1>c:\users\23967\source\repos\project31\project31\源.cpp(100): warning C4305: “+=”: 从“double”到“float”截断 1>c:\users\23967\source\repos\project31\project31\源.cpp(165): error C2181: 没有匹配 if 的非法 else 1>c:\users\23967\source\repos\project31\project31\源.cpp(13): fatal error C1075: “{”: 未找到匹配令牌 1>已完成生成项目“Project31.vcxproj”的操作 - 失败。 ========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
|